package com.kuizii.discovery.client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * @author renxiaodong
 */
@ConfigurationProperties(prefix = "lite.cloud.discovery")
public class DiscoveryProperties {

    /**
     * 当前服务名
     */
    @Value("${lite.cloud.discovery.service_name:${spring.application.name:}}")
    private String serviceName;

    private String clusterId;
    /**
     * 绑定IP，以防多网卡，多IP情况出错
     */
    private String bindIp;
    /**
     * 注册服务的地址
     */
    private String serverAddr;
    /**
     * 用户注册与发现鉴权
     */
    private String securityKey;

    private String securityValue;

    @Value("${lite.cloud.discovery.port:${server.port:}}")
    private Integer port;
    /**
     * 心跳间隔，毫秒
     */
    private Integer heartBeatInterval;


    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getClusterId() {
        return clusterId;
    }

    public void setClusterId(String clusterId) {
        this.clusterId = clusterId;
    }

    public String getBindIp() {
        return bindIp;
    }

    public void setBindIp(String bindIp) {
        this.bindIp = bindIp;
    }

    public String getServerAddr() {
        return serverAddr;
    }

    public void setServerAddr(String serverAddr) {
        this.serverAddr = serverAddr;
    }

    public String getSecurityKey() {
        return securityKey;
    }

    public void setSecurityKey(String securityKey) {
        this.securityKey = securityKey;
    }

    public String getSecurityValue() {
        return securityValue;
    }

    public void setSecurityValue(String securityValue) {
        this.securityValue = securityValue;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Integer getHeartBeatInterval() {
        return heartBeatInterval;
    }

    public void setHeartBeatInterval(Integer heartBeatInterval) {
        this.heartBeatInterval = heartBeatInterval;
    }
}
